package cn.edu.whu.irlab.service.impl;

import cn.edu.whu.irlab.dao.UserGroupMapper;
import cn.edu.whu.irlab.model.UserGroup;
import cn.edu.whu.irlab.model.UserGroupKey;
import cn.edu.whu.irlab.service.UserGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Roger on 2016/7/30.
 */
@Service
public class UserGroupServiceImpl implements UserGroupService {

    @Autowired
    private UserGroupMapper userGroupMapper;

    @Override
    public int deleteByPrimaryKey(UserGroupKey key) {
        return userGroupMapper.deleteByPrimaryKey(key);
    }

    @Override
    public int insert(UserGroup record) {
        return userGroupMapper.insert(record);
    }

    @Override
    public int insertSelective(UserGroup record) {
        return userGroupMapper.insertSelective(record);
    }

    @Override
    public UserGroup selectByPrimaryKey(UserGroupKey key) {
        return userGroupMapper.selectByPrimaryKey(key);
    }

    @Override
    public int updateByPrimaryKeySelective(UserGroup record) {
        return userGroupMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(UserGroup record) {
        return userGroupMapper.updateByPrimaryKey(record);
    }
}
